﻿using IBLL;
using Model;
using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using IDAL;

namespace BLL
{
    public class DoctorBLL : IDoctorBLL
    {
        /// <summary>
        /// 依赖注入
        /// </summary>
        IDoctorDAL _dal;
        public DoctorBLL(IDoctorDAL dal)
        {
            _dal = dal;
        }
        /// <summary>
        /// 添加医生的信息
        /// </summary>
        /// <param name="doctor"></param>
        /// <returns></returns>
        public int AddDoctorDAL(Doctor doctor)
        {
            return _dal.AddDoctorDAL(doctor);
        }
        /// <summary>
        /// 获取一条医生的信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Doctor GetDoctorById(int id)
        {
            return _dal.GetDoctorById(id);
        }
        /// <summary>
        /// 显示医生的信息
        /// </summary>
        /// <param name="Doctorname"></param>
        /// <returns></returns>
        public List<Doctor> GetDoctorsList(string Doctorname)
        {
            return _dal.GetDoctorsList(Doctorname);
        }
        /// <summary>
        /// 修改医生的信息
        /// </summary>
        /// <param name="doctor"></param>
        /// <returns></returns>
        public int UpdateDoctorDAL(Doctor doctor)
        {
            return _dal.UpdateDoctorDAL(doctor);
        }
    }
}
